package com.itheima.day08_api;

public class Demo1_String {
    public static void main(String[] args) {
        String s1 = "hello"; //这里的"hello"就是一个字符串对象，用s1变量接收
        String s2 = "黑马程序员"; //这里的"黑马程序员"就是一个字符串对象，用s2变量接收

        String name = "黑马666";
        System.out.println("name = " + name);

        String rs2 = new String("itheima");
        System.out.println("rs2 = " + rs2);

        char[] chars = {'h', 'e', 'l', 'l', 'o'};
        String s3 = new String(chars);
        System.out.println("s3 = " + s3);

        byte[] bytes = {97, 98, 99, 100};
        String s4 = new String(bytes);
        System.out.println("s4 = " + s4);

    }
}
